package entity;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @program: testexcel
 * @description: excel实体类
 * @author: liu denghui
 * @create: 2019/11/21 22:21
 */
public class ExcelEntity {

    public static String DEVICE_NUMBER = "Device Number";
    public static String RECEIVE_TIME = "Receive Time";
    public static String TEMPERATURE = "temperature";
    public static String TEMPERATURE_UNIT = "unit";
    public static String HUMIDITY = "humidity";
    public static String HUMIDITY_UNIT = "unit";
    public static String ILLUMINATION = "Illumination";
    public static String ILLUMINATION_UNIT = "unit";
    public static String SOIL_TEMPERATURE = "soil temperature";
    public static String SOIL_TEMPERATURE_UNIT = "unit";
    public static String SOIL_MOISTURE = "soil moisture";
    public static String SOIL_MOISTURE_UNIT = "unit";
    public static String SOIL_CONDUCTIVITY = "soil conductivity";
    public static String SOIL_CONDUCTIVITY_UNIT = "unit";
    public static String SOIL_PH = "Soil PH";
    public static String SOIL_PH_UNIT = "unit";
    public static String SOIL_NITROGEN = "Soil nitrogen";
    public static String SOIL_NITROGEN_UNIT = "unit";



    private String DeviceNumber;
    private Date ReceiveTime;
    private double temperature;
    private String temperatureUnit;
    private double humidity;
    private String humidityUnit;
    private double Illumination;
    private String IlluminationUnit;
    private double soilTemperature;
    private String soilTemperatureUnit;
    private double soilMoisture;
    private String soilMoistureUnit;
    private double soilConductivity;
    private String soilConductivityUnit;
    private double SoilPH;
    private String SoilPHUnit;
    private double SoilNitrogen;
    private String SoilNitrogenUnit;


    public ExcelEntity() {
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(this.DeviceNumber + "   ");
        sb.append(this.getReceiveTimeToString() + "   ");
        sb.append(this.temperature + "   ");
        sb.append(this.temperatureUnit + "   ");
        sb.append(this.humidity + "   ");
        sb.append(this.humidityUnit + "   ");
        sb.append(this.Illumination + "   ");
        sb.append(this.IlluminationUnit + "   ");
        sb.append(this.soilTemperature + "   ");
        sb.append(this.soilTemperatureUnit + "   ");
        sb.append(this.soilMoisture + "   ");
        sb.append(this.soilMoistureUnit + "   ");
        sb.append(this.soilConductivity + "   ");
        sb.append(this.soilConductivityUnit + "   ");
        sb.append(this.SoilPH + "   ");
        sb.append(this.SoilPHUnit + "   ");
        sb.append(this.SoilNitrogen + "   ");
        sb.append(this.SoilNitrogenUnit);
        return sb.toString();
    }

    public String getDeviceNumber() {
        return DeviceNumber;
    }

    public void setDeviceNumber(String deviceNumber) {
        DeviceNumber = deviceNumber;
    }

    public String getReceiveTimeToString() {
        SimpleDateFormat formatter = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss");
        String date = formatter.format(this.ReceiveTime);
        return date;
    }

    public Date getReceiveTime() {
        return this.ReceiveTime;
    }

    public void setReceiveTime(Date receiveTime) {
        ReceiveTime = receiveTime;
    }

    public double getTemperature() {
        return temperature;
    }

    public void setTemperature(double temperature) {
        this.temperature = temperature;
    }

    public String getTemperatureUnit() {
        return temperatureUnit;
    }

    public void setTemperatureUnit(String temperatureUnit) {
        this.temperatureUnit = temperatureUnit;
    }

    public double getHumidity() {
        return humidity;
    }

    public void setHumidity(double humidity) {
        this.humidity = humidity;
    }

    public String getHumidityUnit() {
        return humidityUnit;
    }

    public void setHumidityUnit(String humidityUnit) {
        this.humidityUnit = humidityUnit;
    }

    public double getIllumination() {
        return Illumination;
    }

    public void setIllumination(double illumination) {
        Illumination = illumination;
    }

    public String getIlluminationUnit() {
        return IlluminationUnit;
    }

    public void setIlluminationUnit(String illuminationUnit) {
        IlluminationUnit = illuminationUnit;
    }

    public double getSoilTemperature() {
        return soilTemperature;
    }

    public void setSoilTemperature(double soilTemperature) {
        this.soilTemperature = soilTemperature;
    }

    public String getSoilTemperatureUnit() {
        return soilTemperatureUnit;
    }

    public void setSoilTemperatureUnit(String soilTemperatureUnit) {
        this.soilTemperatureUnit = soilTemperatureUnit;
    }

    public double getSoilMoisture() {
        return soilMoisture;
    }

    public void setSoilMoisture(double soilMoisture) {
        this.soilMoisture = soilMoisture;
    }

    public String getSoilMoistureUnit() {
        return soilMoistureUnit;
    }

    public void setSoilMoistureUnit(String soilMoistureUnit) {
        this.soilMoistureUnit = soilMoistureUnit;
    }

    public double getSoilConductivity() {
        return soilConductivity;
    }

    public void setSoilConductivity(double soilConductivity) {
        this.soilConductivity = soilConductivity;
    }

    public String getSoilConductivityUnit() {
        return soilConductivityUnit;
    }

    public void setSoilConductivityUnit(String soilConductivityUnit) {
        this.soilConductivityUnit = soilConductivityUnit;
    }

    public double getSoilPH() {
        return SoilPH;
    }

    public void setSoilPH(double soilPH) {
        SoilPH = soilPH;
    }

    public String getSoilPHUnit() {
        return SoilPHUnit;
    }

    public void setSoilPHUnit(String soilPHUnit) {
        SoilPHUnit = soilPHUnit;
    }

    public double getSoilNitrogen() {
        return SoilNitrogen;
    }

    public void setSoilNitrogen(double soilNitrogen) {
        SoilNitrogen = soilNitrogen;
    }

    public String getSoilNitrogenUnit() {
        return SoilNitrogenUnit;
    }

    public void setSoilNitrogenUnit(String soilNitrogenUnit) {
        SoilNitrogenUnit = soilNitrogenUnit;
    }
}
